#pragma once

namespace AVUI {

class IServiceProvider;

/// <summary>Provides a base class for all XAML markup extensions.</summary>
class MarkupExtension : public Object
{
public:
    DECLARE_ELEMENT(MarkupExtension, Object);

    /// <summary>When implemented in a derived class, returns an object that is set as the value of the target property for this markup extension. </summary>
    /// <returns>The object value to set on the property where the extension is applied. </returns>
    /// <param name="serviceProvider">Object that can provide services for the markup extension.</param>
    virtual TRefCountedPtr<Object> ProvideValue(IServiceProvider* pServiceProvider) = 0;

protected:
    /// <summary>Initializes a new instance of a class derived from <see cref="T:System.Windows.Markup.MarkupExtension" />. </summary>
    MarkupExtension() { };
};

}; // namespace AVUI

